CREATE TABLE [dbo].[EmailTemplate]
(
[EmailTemplateId] [int] NOT NULL IDENTITY(1, 1),
[EmailTemplateTypeId] [int] NOT NULL,
[Subject] [nvarchar] (128) COLLATE Cyrillic_General_CI_AS NOT NULL,
[Content] [nvarchar] (4000) COLLATE Cyrillic_General_CI_AS NOT NULL,
[Description] [nvarchar] (256) COLLATE Cyrillic_General_CI_AS NULL,
[CreatedDate] [datetime] NOT NULL,
[LastModifiedDate] [datetime] NOT NULL,
[IsDeleted] [bit] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EmailTemplate] ADD CONSTRAINT [PK_EmailTemplate] PRIMARY KEY CLUSTERED  ([EmailTemplateId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EmailTemplate] ADD CONSTRAINT [FK_EmailTemplate_EmailTemplateType] FOREIGN KEY ([EmailTemplateTypeId]) REFERENCES [dbo].[EmailTemplateType] ([EmailTemplateTypeId])
GO
